package com.ys.controller.api.outer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ys.service.mall.TmSignLogService;
import com.ys.vo.R;

/**
 * 签到接口
 * @author XDH
 *
 */
@CrossOrigin
@Controller
@RequestMapping("/api/outer/signLog")
public class ApiOuterSignLogController {
	@Autowired
	private TmSignLogService tmSignLogService;
	
	/**
	 * 签到
	 * @return
	 */
    @RequestMapping("/add")
	@ResponseBody
	public R add(String userId) {
    	
    	try {
			return tmSignLogService.add(userId);
		} catch (Exception e) {
			e.printStackTrace();
			return R.error("服务器正在开小差");
		}
	}
}
